package server;

import java.rmi.*;
import java.rmi.registry.*;
import static common.Config.*;

public class Server {
	public static void main(String[] args) {
		try {
			LocateRegistry.createRegistry(1099);
			ServerController controller = new ServerController();
			ServerFrame frame = new ServerFrame(controller);

			controller.begin(frame);

			Naming.rebind(SERVICE, controller);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}